// 引入Router
import { Router } from "https://deno.land/x/oak/mod.ts";
// 引入UserController
import {getUsers, getUser, addUser, updateUser, delteUser} from "../controller/Users.ts";

const router = new Router();


router.get("/api/v1/users", getUsers) // 获取所有用户
      .get("/api/v1/users/:id", getUser)   // 获取单个用户
      .post("/api/v1/users", addUser)       // 添加用户
      .put("/api/v1/users/:id", updateUser) // 修改用户
      .delete("/api/v1/users/:id", delteUser) // 删除用户
        

export default router;